<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>QCNSim: Link Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">QCNSim
   </div>
   <div id="projectbrief">Simulator for Quake-Catcher Network</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="class_link-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Link Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="class_link.html" title="Link class. ">Link</a> class.  
 <a href="class_link.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_link_8h_source.html">Link.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Link:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_link.png" usemap="#Link_map" alt=""/>
  <map id="Link_map" name="Link_map">
<area href="class_entity.html" title="Entity class. " alt="Entity" shape="rect" coords="0,0,43,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac9376c7c81beda0e397569930616ac23"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#ac9376c7c81beda0e397569930616ac23">Link</a> (std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt; <a class="el" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a>, std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt; <a class="el" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>, double <a class="el" href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">bandwidth</a>, double <a class="el" href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">propagationDelay</a>, <a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;<a class="el" href="class_link.html#a0f55fbe50f26e0c9d0469e3300584870">simulatorGlobals</a>, <a class="el" href="class_scheduler.html">Scheduler</a> &amp;<a class="el" href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">scheduler</a>, const std::string &amp;<a class="el" href="class_link.html#a3175152212d21764b83996c540617838">name</a>=&quot;&quot;, <a class="el" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96">LinkType</a> <a class="el" href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">linkType</a>=<a class="el" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96aea1abc1cf13667617460c8e0c59c02c1">LinkType::SIMPLEX_LINK</a>)</td></tr>
<tr class="memdesc:ac9376c7c81beda0e397569930616ac23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#ac9376c7c81beda0e397569930616ac23">More...</a><br/></td></tr>
<tr class="separator:ac9376c7c81beda0e397569930616ac23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af485c0065bf1fdc5c296b45f6ef96fd3"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#af485c0065bf1fdc5c296b45f6ef96fd3">getNodeA</a> () const </td></tr>
<tr class="memdesc:af485c0065bf1fdc5c296b45f6ef96fd3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return pointer to nodeA (one side of link).  <a href="#af485c0065bf1fdc5c296b45f6ef96fd3">More...</a><br/></td></tr>
<tr class="separator:af485c0065bf1fdc5c296b45f6ef96fd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb8020ddc851ceb0bf5dba01182d688c"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#adb8020ddc851ceb0bf5dba01182d688c">getNodeB</a> () const </td></tr>
<tr class="memdesc:adb8020ddc851ceb0bf5dba01182d688c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return pointer to nodeB (another side of link).  <a href="#adb8020ddc851ceb0bf5dba01182d688c">More...</a><br/></td></tr>
<tr class="separator:adb8020ddc851ceb0bf5dba01182d688c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f8c266451029f36a935712f296981bd"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a4f8c266451029f36a935712f296981bd">getSourceNode</a> () const </td></tr>
<tr class="memdesc:a4f8c266451029f36a935712f296981bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return pointer to nodeA, the Source node of a Simplex link.  <a href="#a4f8c266451029f36a935712f296981bd">More...</a><br/></td></tr>
<tr class="separator:a4f8c266451029f36a935712f296981bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61938273683eed82bfc8fff1b13d077d"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a61938273683eed82bfc8fff1b13d077d">getDestinationNode</a> () const </td></tr>
<tr class="memdesc:a61938273683eed82bfc8fff1b13d077d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return pointer to nodeB, the Destination node of a Simplex link.  <a href="#a61938273683eed82bfc8fff1b13d077d">More...</a><br/></td></tr>
<tr class="separator:a61938273683eed82bfc8fff1b13d077d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2cafc5931128c3a03ac50fa283e9c18f"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a2cafc5931128c3a03ac50fa283e9c18f">getBandwidth</a> () const </td></tr>
<tr class="memdesc:a2cafc5931128c3a03ac50fa283e9c18f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a2cafc5931128c3a03ac50fa283e9c18f">More...</a><br/></td></tr>
<tr class="separator:a2cafc5931128c3a03ac50fa283e9c18f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6f3bcc6896090d2b0ab665c0fedbf17"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#ab6f3bcc6896090d2b0ab665c0fedbf17">getPropagationDelay</a> () const </td></tr>
<tr class="memdesc:ab6f3bcc6896090d2b0ab665c0fedbf17"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return propagation delay or latency of link.  <a href="#ab6f3bcc6896090d2b0ab665c0fedbf17">More...</a><br/></td></tr>
<tr class="separator:ab6f3bcc6896090d2b0ab665c0fedbf17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0d2091b3406725300be167b82216552"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#ad0d2091b3406725300be167b82216552">getName</a> () const </td></tr>
<tr class="memdesc:ad0d2091b3406725300be167b82216552"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return name of link.  <a href="#ad0d2091b3406725300be167b82216552">More...</a><br/></td></tr>
<tr class="separator:ad0d2091b3406725300be167b82216552"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f1d8f13ecc78be10812fa1d78670339"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a3f1d8f13ecc78be10812fa1d78670339">isUp</a> () const </td></tr>
<tr class="memdesc:a3f1d8f13ecc78be10812fa1d78670339"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if link is up; false otherwise. This status is the direct status of underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a>.  <a href="#a3f1d8f13ecc78be10812fa1d78670339">More...</a><br/></td></tr>
<tr class="separator:a3f1d8f13ecc78be10812fa1d78670339"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9600cdb73665ae77d5237abdb2ed51c3"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83af">LinkReturnType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a9600cdb73665ae77d5237abdb2ed51c3">transmitPdu</a> (<a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> transmitEventType, <a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> endTransmitEventType, std::shared_ptr&lt; const <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; pdu)</td></tr>
<tr class="memdesc:a9600cdb73665ae77d5237abdb2ed51c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Requests transmission a PDU to (or through) the link.  <a href="#a9600cdb73665ae77d5237abdb2ed51c3">More...</a><br/></td></tr>
<tr class="separator:a9600cdb73665ae77d5237abdb2ed51c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb8a206db623b733b98bb5866335b19f"><td class="memItemLeft" align="right" valign="top">virtual std::list<br class="typebreak"/>
&lt; std::shared_ptr&lt; const <br class="typebreak"/>
<a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;<br class="typebreak"/>
 &gt;::size_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#abb8a206db623b733b98bb5866335b19f">getInTransitQueueSize</a> () const </td></tr>
<tr class="memdesc:abb8a206db623b733b98bb5866335b19f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current PDU in-transit queue size.  <a href="#abb8a206db623b733b98bb5866335b19f">More...</a><br/></td></tr>
<tr class="separator:abb8a206db623b733b98bb5866335b19f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4be56bec31ca5a278cce5c4b604b03ec"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83af">LinkReturnType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a4be56bec31ca5a278cce5c4b604b03ec">propagatePdu</a> (<a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> nextEvent, std::shared_ptr&lt; const <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; pdu)</td></tr>
<tr class="memdesc:a4be56bec31ca5a278cce5c4b604b03ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ends transmission (release PDU from <a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) and propagate PDU through this link.  <a href="#a4be56bec31ca5a278cce5c4b604b03ec">More...</a><br/></td></tr>
<tr class="separator:a4be56bec31ca5a278cce5c4b604b03ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9f5b6b14f9f191421c7e131ccb288ea"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#aa9f5b6b14f9f191421c7e131ccb288ea">isTransmissionServerBusy</a> () const </td></tr>
<tr class="separator:aa9f5b6b14f9f191421c7e131ccb288ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ea6faa515d88ae801e070291c4b917d"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83af">LinkReturnType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a5ea6faa515d88ae801e070291c4b917d">endPropagation</a> (std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; pdu)</td></tr>
<tr class="memdesc:a5ea6faa515d88ae801e070291c4b917d"><td class="mdescLeft">&#160;</td><td class="mdescRight">PDU has successfully propagated through the link; end propagation.  <a href="#a5ea6faa515d88ae801e070291c4b917d">More...</a><br/></td></tr>
<tr class="separator:a5ea6faa515d88ae801e070291c4b917d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a297af435322be39d8562091688c460a7"><td class="memItemLeft" align="right" valign="top">virtual std::list<br class="typebreak"/>
&lt; <a class="el" href="class_facility_queue_element.html">FacilityQueueElement</a> &gt;<br class="typebreak"/>
::size_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a297af435322be39d8562091688c460a7">getTransmissionQueueSize</a> () const </td></tr>
<tr class="memdesc:a297af435322be39d8562091688c460a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) queue size.  <a href="#a297af435322be39d8562091688c460a7">More...</a><br/></td></tr>
<tr class="separator:a297af435322be39d8562091688c460a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ae26f20287944d54c2db9d12b56f28d"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a3ae26f20287944d54c2db9d12b56f28d">getMaxRecordedTransmissionQueueSize</a> () const </td></tr>
<tr class="memdesc:a3ae26f20287944d54c2db9d12b56f28d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) max recorded queue size.  <a href="#a3ae26f20287944d54c2db9d12b56f28d">More...</a><br/></td></tr>
<tr class="separator:a3ae26f20287944d54c2db9d12b56f28d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab93be277b905f1bd1746d649ebb4461d"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#ab93be277b905f1bd1746d649ebb4461d">getTransmissionQueueSizeLimit</a> () const </td></tr>
<tr class="memdesc:ab93be277b905f1bd1746d649ebb4461d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) queue size limit.  <a href="#ab93be277b905f1bd1746d649ebb4461d">More...</a><br/></td></tr>
<tr class="separator:ab93be277b905f1bd1746d649ebb4461d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0866e5df549e6c3d83c0247d098d4ab0"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a0866e5df549e6c3d83c0247d098d4ab0">getDroppedPdusCountTransmissionServer</a> () const </td></tr>
<tr class="separator:a0866e5df549e6c3d83c0247d098d4ab0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5d1051d4f63ff9018fd4d6f5848dcf1"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#af5d1051d4f63ff9018fd4d6f5848dcf1">getDroppedPdusCountMedium</a> () const </td></tr>
<tr class="separator:af5d1051d4f63ff9018fd4d6f5848dcf1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a194c6afd1182f7543ebd50f859b86123"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a194c6afd1182f7543ebd50f859b86123">getDroppedPdusCountWholeLink</a> () const </td></tr>
<tr class="separator:a194c6afd1182f7543ebd50f859b86123"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a698315546b33a6808b37ccadeffa0d65"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96">LinkType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a698315546b33a6808b37ccadeffa0d65">getLinkType</a> () const </td></tr>
<tr class="memdesc:a698315546b33a6808b37ccadeffa0d65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get LinkType (type of link) of this link.  <a href="#a698315546b33a6808b37ccadeffa0d65">More...</a><br/></td></tr>
<tr class="separator:a698315546b33a6808b37ccadeffa0d65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a110ac6153337a18249b4a4197ed1a2a7"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_link.html">Link</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a110ac6153337a18249b4a4197ed1a2a7">getReverseLink</a> () const </td></tr>
<tr class="memdesc:a110ac6153337a18249b4a4197ed1a2a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get ReverseLink reference.  <a href="#a110ac6153337a18249b4a4197ed1a2a7">More...</a><br/></td></tr>
<tr class="separator:a110ac6153337a18249b4a4197ed1a2a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ed2e4ac2f5381d53399f8937e790b93"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a8ed2e4ac2f5381d53399f8937e790b93">isNodeAlinkedToNodeB</a> (std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt; <a class="el" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a>, std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt; <a class="el" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>) const </td></tr>
<tr class="memdesc:a8ed2e4ac2f5381d53399f8937e790b93"><td class="mdescLeft">&#160;</td><td class="mdescRight">Verifies whether this link connects parameter nodeA and nodeB.  <a href="#a8ed2e4ac2f5381d53399f8937e790b93">More...</a><br/></td></tr>
<tr class="separator:a8ed2e4ac2f5381d53399f8937e790b93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57170d6e8669a32107794b0a2cc98890"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a57170d6e8669a32107794b0a2cc98890">setUp</a> ()</td></tr>
<tr class="memdesc:a57170d6e8669a32107794b0a2cc98890"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set <a class="el" href="class_link.html" title="Link class. ">Link</a> up (in both directions in case of duplex links).  <a href="#a57170d6e8669a32107794b0a2cc98890">More...</a><br/></td></tr>
<tr class="separator:a57170d6e8669a32107794b0a2cc98890"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe69b641a7b52cdc830307dfcd9e8af3"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#afe69b641a7b52cdc830307dfcd9e8af3">setDown</a> ()</td></tr>
<tr class="memdesc:afe69b641a7b52cdc830307dfcd9e8af3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set <a class="el" href="class_link.html" title="Link class. ">Link</a> down (in both directions in case of duplex links).  <a href="#afe69b641a7b52cdc830307dfcd9e8af3">More...</a><br/></td></tr>
<tr class="separator:afe69b641a7b52cdc830307dfcd9e8af3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af64db4e49ef26c305b301db2ae318244"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#af64db4e49ef26c305b301db2ae318244">setTransmissionQueueSizeLimit</a> (unsigned int limit)</td></tr>
<tr class="memdesc:af64db4e49ef26c305b301db2ae318244"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) queue size limit (for both forward and reverse links in case of duplex links).  <a href="#af64db4e49ef26c305b301db2ae318244">More...</a><br/></td></tr>
<tr class="separator:af64db4e49ef26c305b301db2ae318244"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_entity"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_entity')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_entity.html">Entity</a></td></tr>
<tr class="memitem:ac2da1e8a32161accc56f39ac52cebd86 inherit pub_methods_class_entity"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entity.html#ac2da1e8a32161accc56f39ac52cebd86">~Entity</a> ()=0</td></tr>
<tr class="memdesc:ac2da1e8a32161accc56f39ac52cebd86 inherit pub_methods_class_entity"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make this abstract (pure virtual), cannot be instantiated.  <a href="#ac2da1e8a32161accc56f39ac52cebd86">More...</a><br/></td></tr>
<tr class="separator:ac2da1e8a32161accc56f39ac52cebd86 inherit pub_methods_class_entity"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a13cc3d87988b98b33760ba3705f6bd0c"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a13cc3d87988b98b33760ba3705f6bd0c">purgeInTransitQueue</a> ()</td></tr>
<tr class="memdesc:a13cc3d87988b98b33760ba3705f6bd0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Purge inTransitQueue, update statistics, return number of dropped PDUs from link medium.  <a href="#a13cc3d87988b98b33760ba3705f6bd0c">More...</a><br/></td></tr>
<tr class="separator:a13cc3d87988b98b33760ba3705f6bd0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:afc5d6ab142420b803c1f9802ad0199f5"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a></td></tr>
<tr class="memdesc:afc5d6ab142420b803c1f9802ad0199f5"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_node.html" title="Node class. ">Node</a> at one side of the link.  <a href="#afc5d6ab142420b803c1f9802ad0199f5">More...</a><br/></td></tr>
<tr class="separator:afc5d6ab142420b803c1f9802ad0199f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7a426a53a41d26351c85cb2cea50d60"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a></td></tr>
<tr class="memdesc:af7a426a53a41d26351c85cb2cea50d60"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_node.html" title="Node class. ">Node</a> at the other side of the link.  <a href="#af7a426a53a41d26351c85cb2cea50d60">More...</a><br/></td></tr>
<tr class="separator:af7a426a53a41d26351c85cb2cea50d60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff4506be6c9b62b335e3a389a01969ef"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">bandwidth</a></td></tr>
<tr class="memdesc:aff4506be6c9b62b335e3a389a01969ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bandwidth of this link, typically in bits per second.  <a href="#aff4506be6c9b62b335e3a389a01969ef">More...</a><br/></td></tr>
<tr class="separator:aff4506be6c9b62b335e3a389a01969ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31855f1eaf9c6562f1dc2067d475dd4d"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">propagationDelay</a></td></tr>
<tr class="memdesc:a31855f1eaf9c6562f1dc2067d475dd4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Propagation delay of this link, which is medium-dependent, typically in seconds.  <a href="#a31855f1eaf9c6562f1dc2067d475dd4d">More...</a><br/></td></tr>
<tr class="separator:a31855f1eaf9c6562f1dc2067d475dd4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3175152212d21764b83996c540617838"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a3175152212d21764b83996c540617838">name</a></td></tr>
<tr class="memdesc:a3175152212d21764b83996c540617838"><td class="mdescLeft">&#160;</td><td class="mdescRight">Name of this link.  <a href="#a3175152212d21764b83996c540617838">More...</a><br/></td></tr>
<tr class="separator:a3175152212d21764b83996c540617838"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53ed79d4f4d927e120d0cbfa00158089"><td class="memItemLeft" align="right" valign="top">std::list&lt; std::shared_ptr<br class="typebreak"/>
&lt; const <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a></td></tr>
<tr class="memdesc:a53ed79d4f4d927e120d0cbfa00158089"><td class="mdescLeft">&#160;</td><td class="mdescRight">Queue for PDUs in transit (in propagation) in this link.  <a href="#a53ed79d4f4d927e120d0cbfa00158089">More...</a><br/></td></tr>
<tr class="separator:a53ed79d4f4d927e120d0cbfa00158089"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f55fbe50f26e0c9d0469e3300584870"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a0f55fbe50f26e0c9d0469e3300584870">simulatorGlobals</a></td></tr>
<tr class="memdesc:a0f55fbe50f26e0c9d0469e3300584870"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object.  <a href="#a0f55fbe50f26e0c9d0469e3300584870">More...</a><br/></td></tr>
<tr class="separator:a0f55fbe50f26e0c9d0469e3300584870"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad60d0e445f4593579b62a3c2ecd1fa75"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_scheduler.html">Scheduler</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">scheduler</a></td></tr>
<tr class="memdesc:ad60d0e445f4593579b62a3c2ecd1fa75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference to <a class="el" href="class_scheduler.html" title="Scheduler class. ">Scheduler</a> object.  <a href="#ad60d0e445f4593579b62a3c2ecd1fa75">More...</a><br/></td></tr>
<tr class="separator:ad60d0e445f4593579b62a3c2ecd1fa75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe44953f8653b44f2b914daa0bb6bcdc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_facility.html">Facility</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a></td></tr>
<tr class="memdesc:abe44953f8653b44f2b914daa0bb6bcdc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transmission server for this <a class="el" href="class_link.html" title="Link class. ">Link</a> (one-way).  <a href="#abe44953f8653b44f2b914daa0bb6bcdc">More...</a><br/></td></tr>
<tr class="separator:abe44953f8653b44f2b914daa0bb6bcdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71c43c39d94c9b8b95d1810b5c7d17ac"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">droppedPdusCountMedium</a></td></tr>
<tr class="memdesc:a71c43c39d94c9b8b95d1810b5c7d17ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Count of dropped PDUs by this link's medium.  <a href="#a71c43c39d94c9b8b95d1810b5c7d17ac">More...</a><br/></td></tr>
<tr class="separator:a71c43c39d94c9b8b95d1810b5c7d17ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5605d4788830084dc9ca7d3e1fc418f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96">LinkType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">linkType</a></td></tr>
<tr class="memdesc:aa5605d4788830084dc9ca7d3e1fc418f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of link (typically Simplex or Duplex).  <a href="#aa5605d4788830084dc9ca7d3e1fc418f">More...</a><br/></td></tr>
<tr class="separator:aa5605d4788830084dc9ca7d3e1fc418f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad088198953b55a9c6781e15dfa49ad72"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_link.html">Link</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#ad088198953b55a9c6781e15dfa49ad72">reverseLink</a></td></tr>
<tr class="memdesc:ad088198953b55a9c6781e15dfa49ad72"><td class="mdescLeft">&#160;</td><td class="mdescRight">Contains the pointer for the link in the reverse direction in case of Duplex links.  <a href="#ad088198953b55a9c6781e15dfa49ad72">More...</a><br/></td></tr>
<tr class="separator:ad088198953b55a9c6781e15dfa49ad72"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="class_link.html" title="Link class. ">Link</a> class. </p>
<dl class="section author"><dt>Author</dt><dd>Marcos Portnoi </dd></dl>
<dl class="section date"><dt>Date</dt><dd>October 2013</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2013 University of Delaware. </dd>
<dd>
QCNSim uses elements of TARVOS simulator, Copyright (C) 2005, 2006, 2007 Marcos Portnoi. </dd></dl>
<dl class="section user"><dt></dt><dd>This file is part of QCNSim. QCNSim is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>
 QCNSim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.<br/>
 You should have received a copy of the GNU Lesser General Public License along with QCNSim. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </dd></dl>
<dl class="section user"><dt>Description</dt><dd>A <a class="el" href="class_link.html" title="Link class. ">Link</a> connects two <a class="el" href="class_node.html" title="Node class. ">Node</a> objects.</dd></dl>
<p>Typically, a <a class="el" href="class_link.html" title="Link class. ">Link</a> can be simplex (one-way) or duplex (two-way). A duplex link is basically two simplex links, one opposite to the other in node direction; the other parameters are common.</p>
<p>Internally, a link has a <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> object with one server. The facility transmits the PDU with speed proportional to the bandwidth, i.e., transmission time = packet size / bandwidth. After transmission, the PDU is propagated through the link, with time delay = propagation delay or latency. The propagation delay is medium-dependent. Fiber optics is a faster medium than copper. Propagation delay is proportional to the distance between the nodes and the speed of light (or electrons) in the medium. Propagation delay is a fixed time delay, defined when creating the link, and models an infinite capacity server from Queuing Theory.</p>
<p>Conceptually, a link will forward a PDU in two stages, with an event for each: transmission, and propagation. If a link goes down, all PDUs currently in transmission queue and in propagation queue or transit queue. Hence, there are two queues here: one from the transmission <a class="el" href="class_facility.html" title="Facility class. ">Facility</a>, and one from the propagation delay center. Naturally, if a link has a high bandwidth-delay-product, there can be many PDUs in transit within the link at the same time.</p>
<p>The link is modelled with a <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> with one server, acting as the transmission server. The service time is a function of the link bandwidth and PDU size, such that:</p>
<p>service_time = PDU_size / bandwidth</p>
<p>Connected to the output of the transmission server, there is a delay center or infinite capacity server. This delay center models the propagation delay of the link. The complete handling of a PDU through a link will be composed of three events:</p>
<ol type="1">
<li>REQUEST_PDU_TRANSMISSION_AT_LINK: if successful, the next END_TRANSMISSION_PROPAGATE_PDU_AT_LINK event must be scheduled for the link. Otherwise, the PDU was probably enqueued or dropped.</li>
<li>END_TRANSMISSION_PROPAGATE_PDU_AT_LINK: if the previous event was successful, this event is scheduled. This event will cause the <a class="el" href="class_link.html" title="Link class. ">Link</a> transmission server to release the PDU and then the PDU will commence propagation in the link. This is done by scheduling a PDUTOKEN_ARRIVAL_AT_NODE after the fixed-time propagation delay.</li>
<li>PDUTOKEN_ARRIVAL_AT_NODE: scheduled after transmission and release of PDU from <a class="el" href="class_link.html" title="Link class. ">Link</a>'s transmission server. At this event, the PDU has arrived at the destination node.</li>
</ol>
<p>The functions that return statistics, such as dropped PDUs at medium or at transmission server, are constrained to one link direction only. Thus, to obtain the total statistics for both directions of a link, call the statistics functions for each direction and then add the results. The statistics will never overlap (i.e., one PDU dropped in one direction will never be added to statistics to the other direction). </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00069">69</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ac9376c7c81beda0e397569930616ac23"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Link::Link </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td>
          <td class="paramname"><em>nodeA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td>
          <td class="paramname"><em>nodeB</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>bandwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>propagationDelay</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;&#160;</td>
          <td class="paramname"><em>simulatorGlobals</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_scheduler.html">Scheduler</a> &amp;&#160;</td>
          <td class="paramname"><em>scheduler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96">LinkType</a>&#160;</td>
          <td class="paramname"><em>linkType</em> = <code><a class="el" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96aea1abc1cf13667617460c8e0c59c02c1">LinkType::SIMPLEX_LINK</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default constructor. </p>
<dl class="section author"><dt>Author</dt><dd>Marcos Portnoi </dd></dl>
<dl class="section date"><dt>Date</dt><dd>October 2013</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2013 University of Delaware. </dd>
<dd>
QCNSim uses elements of TARVOS simulator, Copyright (C) 2005, 2006, 2007 Marcos Portnoi. </dd></dl>
<dl class="section user"><dt></dt><dd>This file is part of QCNSim. QCNSim is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>
 QCNSim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.<br/>
 You should have received a copy of the GNU Lesser General Public License along with QCNSim. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nodeA</td><td>Pointer to <a class="el" href="class_node.html" title="Node class. ">Node</a> at one side of the link. </td></tr>
    <tr><td class="paramname">nodeB</td><td>Pointer to <a class="el" href="class_node.html" title="Node class. ">Node</a> at the other side of the link. </td></tr>
    <tr><td class="paramname">bandwidth</td><td>Bandwidth of this link, typically in bits per second. </td></tr>
    <tr><td class="paramname">propagationDelay</td><td>Propagation delay of this link, which is medium-dependent, typically in seconds. </td></tr>
    <tr><td class="paramname">simulatorGlobals</td><td>Reference to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object. </td></tr>
    <tr><td class="paramname">scheduler</td><td>Reference to <a class="el" href="class_scheduler.html" title="Scheduler class. ">Scheduler</a> object. </td></tr>
    <tr><td class="paramname">name</td><td>Name of this link. Default is "". </td></tr>
    <tr><td class="paramname">linkType</td><td>Type of link. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00034">34</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;                                                                        : <a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a>(<a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a>), <a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>(<a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>), <a class="code" href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">bandwidth</a>(<a class="code" href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">bandwidth</a>),</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <a class="code" href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">propagationDelay</a>(<a class="code" href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">propagationDelay</a>), <a class="code" href="class_link.html#a0f55fbe50f26e0c9d0469e3300584870">simulatorGlobals</a>(simulatorGlobals), <a class="code" href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">scheduler</a>(scheduler), <a class="code" href="class_link.html#a3175152212d21764b83996c540617838">name</a>(<a class="code" href="class_link.html#a3175152212d21764b83996c540617838">name</a>), <a class="code" href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">linkType</a>(<a class="code" href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">linkType</a>),</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>(<a class="code" href="class_facility.html">Facility</a>(<span class="stringliteral">&quot;Transmission Server Original Direction&quot;</span>, simulatorGlobals, scheduler)), <a class="code" href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">droppedPdusCountMedium</a>(0) { <span class="comment">// Creates one transmission server (Facility with one server).</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <span class="comment">// If this is a duplex link, create another link object in the reverse direction, put its reference into the member variable.</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">linkType</a> == <a class="code" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975">LinkType::DUPLEX_LINK</a>) {</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        <a class="code" href="class_link.html#ad088198953b55a9c6781e15dfa49ad72">reverseLink</a> = std::make_shared&lt;Link&gt;(<a class="code" href="class_link.html#ac9376c7c81beda0e397569930616ac23">Link</a>(<a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>, <a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a>, <a class="code" href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">bandwidth</a>, <a class="code" href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">propagationDelay</a>, simulatorGlobals, scheduler, <a class="code" href="class_link.html#a3175152212d21764b83996c540617838">name</a>, <a class="code" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96aea1abc1cf13667617460c8e0c59c02c1">LinkType::SIMPLEX_LINK</a>));</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        <a class="code" href="class_link.html#ad088198953b55a9c6781e15dfa49ad72">reverseLink</a>-&gt;transmissionServer.setName(<span class="stringliteral">&quot;Transmission Server Reverse Direction&quot;</span>);</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    }</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;}</div>
<div class="ttc" id="class_link_html_aa5605d4788830084dc9ca7d3e1fc418f"><div class="ttname"><a href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">Link::linkType</a></div><div class="ttdeci">LinkType linkType</div><div class="ttdoc">Type of link (typically Simplex or Duplex). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00081">Link.h:81</a></div></div>
<div class="ttc" id="_link_type_8h_html_a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975"><div class="ttname"><a href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975">LinkType::DUPLEX_LINK</a></div><div class="ttdoc">Two-way, bidirectional link betwen to nodes. </div></div>
<div class="ttc" id="class_link_html_afc5d6ab142420b803c1f9802ad0199f5"><div class="ttname"><a href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">Link::nodeA</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeA</div><div class="ttdoc">Node at one side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00071">Link.h:71</a></div></div>
<div class="ttc" id="class_link_html_ac9376c7c81beda0e397569930616ac23"><div class="ttname"><a href="class_link.html#ac9376c7c81beda0e397569930616ac23">Link::Link</a></div><div class="ttdeci">Link(std::shared_ptr&lt; Node &gt; nodeA, std::shared_ptr&lt; Node &gt; nodeB, double bandwidth, double propagationDelay, SimulatorGlobals &amp;simulatorGlobals, Scheduler &amp;scheduler, const std::string &amp;name=&quot;&quot;, LinkType linkType=LinkType::SIMPLEX_LINK)</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8cpp_source.html#l00034">Link.cpp:34</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00079">Link.h:79</a></div></div>
<div class="ttc" id="class_link_html_a3175152212d21764b83996c540617838"><div class="ttname"><a href="class_link.html#a3175152212d21764b83996c540617838">Link::name</a></div><div class="ttdeci">std::string name</div><div class="ttdoc">Name of this link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00075">Link.h:75</a></div></div>
<div class="ttc" id="class_link_html_a0f55fbe50f26e0c9d0469e3300584870"><div class="ttname"><a href="class_link.html#a0f55fbe50f26e0c9d0469e3300584870">Link::simulatorGlobals</a></div><div class="ttdeci">SimulatorGlobals &amp; simulatorGlobals</div><div class="ttdoc">Reference to SimulatorGlobals object. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00077">Link.h:77</a></div></div>
<div class="ttc" id="class_link_html_a71c43c39d94c9b8b95d1810b5c7d17ac"><div class="ttname"><a href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">Link::droppedPdusCountMedium</a></div><div class="ttdeci">unsigned int droppedPdusCountMedium</div><div class="ttdoc">Count of dropped PDUs by this link&amp;#39;s medium. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00080">Link.h:80</a></div></div>
<div class="ttc" id="class_link_html_af7a426a53a41d26351c85cb2cea50d60"><div class="ttname"><a href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">Link::nodeB</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeB</div><div class="ttdoc">Node at the other side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00072">Link.h:72</a></div></div>
<div class="ttc" id="class_facility_html"><div class="ttname"><a href="class_facility.html">Facility</a></div><div class="ttdoc">Facility class. </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8h_source.html#l00044">Facility.h:44</a></div></div>
<div class="ttc" id="class_link_html_ad088198953b55a9c6781e15dfa49ad72"><div class="ttname"><a href="class_link.html#ad088198953b55a9c6781e15dfa49ad72">Link::reverseLink</a></div><div class="ttdeci">std::shared_ptr&lt; Link &gt; reverseLink</div><div class="ttdoc">Contains the pointer for the link in the reverse direction in case of Duplex links. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00082">Link.h:82</a></div></div>
<div class="ttc" id="class_link_html_a31855f1eaf9c6562f1dc2067d475dd4d"><div class="ttname"><a href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">Link::propagationDelay</a></div><div class="ttdeci">double propagationDelay</div><div class="ttdoc">Propagation delay of this link, which is medium-dependent, typically in seconds. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
<div class="ttc" id="class_link_html_ad60d0e445f4593579b62a3c2ecd1fa75"><div class="ttname"><a href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">Link::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00078">Link.h:78</a></div></div>
<div class="ttc" id="class_link_html_aff4506be6c9b62b335e3a389a01969ef"><div class="ttname"><a href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">Link::bandwidth</a></div><div class="ttdeci">double bandwidth</div><div class="ttdoc">Bandwidth of this link, typically in bits per second. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00073">Link.h:73</a></div></div>
<div class="ttc" id="_link_type_8h_html_a1e09bc05c5df6349a74bd3b9db638a96aea1abc1cf13667617460c8e0c59c02c1"><div class="ttname"><a href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96aea1abc1cf13667617460c8e0c59c02c1">LinkType::SIMPLEX_LINK</a></div><div class="ttdoc">One-way link between two nodes. </div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a5ea6faa515d88ae801e070291c4b917d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83af">LinkReturnType</a> Link::endPropagation </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td>
          <td class="paramname"><em>pdu</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>PDU has successfully propagated through the link; end propagation. </p>
<p>This function must be called upon handling the event ARRIVAL of PDU at node coming from a link. This is necessary such that the PDU is removed from the inTransitQueue. Note that this function must be called <em>before</em> the PDU is delivered to the node, because this function identifies the proper link direction by using the previous and next fields from PDU (the nodeA and nodeB from the current link that just propagated the PDU). If the PDU is delivered to the node before this function is called (by calling the <a class="el" href="class_node.html" title="Node class. ">Node</a>'s processAndForward function), then these previous and next fields will be updated for the next link and this function will not work correctly. This function checks whether the "previous" and "next" nodes within the PDU fields are in fact connected through this link, or through the reverse link. It will activate the appropriate forward or reverse link, or return an ERROR message otherwise.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pdu</td><td>PDU that is arriving at node and thus has been successfully propagated. the pdu without any node checking.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Return type or result of propagation attempt. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00270">270</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;                                                                       {</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;    <span class="comment">// Consistency check. If nodes in PDU&#39;s previous and next fields are not connected by this node, then refuse end propagation and return error state.</span></div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    <span class="keywordflow">if</span> (pdu-&gt;previous == <a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a> &amp;&amp; pdu-&gt;next == <a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>) { <span class="comment">// Forward link (this link) connects the nodes. Use it.</span></div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;        <a class="code" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a>.remove(pdu); <span class="comment">// Removes the PDU (it should be at head of queue). If not found, does nothing. I.e., if the PDU is not really in transit here, this function will not verify it.</span></div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa5bb3aee7ae9660ee59a2daf782a4aedb">LinkReturnType::PDU_PROPAGATED</a>;</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">linkType</a> == <a class="code" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975">LinkType::DUPLEX_LINK</a> &amp;&amp; pdu-&gt;next == <a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a> &amp;&amp; pdu-&gt;previous == <a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>) { <span class="comment">// The reverse link must be used for this PDU, in case of duplex links.</span></div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        <span class="comment">// Call this function here in recursion for the reverse link.</span></div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_link.html#a110ac6153337a18249b4a4197ed1a2a7">getReverseLink</a>()-&gt;endPropagation(pdu);</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;        <span class="comment">// Neither the forward, nor the reverse link connect the nodes within the PDU. Return error.</span></div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa1540ac8eab2f22bb0c7e66c69ff50dc3">LinkReturnType::ERROR_LINK_DOES_NOT_CONNECT_NODES</a>;</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;    }</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;}</div>
<div class="ttc" id="class_link_html_aa5605d4788830084dc9ca7d3e1fc418f"><div class="ttname"><a href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">Link::linkType</a></div><div class="ttdeci">LinkType linkType</div><div class="ttdoc">Type of link (typically Simplex or Duplex). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00081">Link.h:81</a></div></div>
<div class="ttc" id="_link_type_8h_html_a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975"><div class="ttname"><a href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975">LinkType::DUPLEX_LINK</a></div><div class="ttdoc">Two-way, bidirectional link betwen to nodes. </div></div>
<div class="ttc" id="class_link_html_afc5d6ab142420b803c1f9802ad0199f5"><div class="ttname"><a href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">Link::nodeA</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeA</div><div class="ttdoc">Node at one side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00071">Link.h:71</a></div></div>
<div class="ttc" id="class_link_html_a53ed79d4f4d927e120d0cbfa00158089"><div class="ttname"><a href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">Link::inTransitQueue</a></div><div class="ttdeci">std::list&lt; std::shared_ptr&lt; const ProtocolDataUnit &gt; &gt; inTransitQueue</div><div class="ttdoc">Queue for PDUs in transit (in propagation) in this link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00076">Link.h:76</a></div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa5bb3aee7ae9660ee59a2daf782a4aedb"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa5bb3aee7ae9660ee59a2daf782a4aedb">LinkReturnType::PDU_PROPAGATED</a></div><div class="ttdoc">PDU has been propagated (transited) through the link medium and removed from inTransitQueue (if PDU w...</div></div>
<div class="ttc" id="class_link_html_af7a426a53a41d26351c85cb2cea50d60"><div class="ttname"><a href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">Link::nodeB</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeB</div><div class="ttdoc">Node at the other side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00072">Link.h:72</a></div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa1540ac8eab2f22bb0c7e66c69ff50dc3"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa1540ac8eab2f22bb0c7e66c69ff50dc3">LinkReturnType::ERROR_LINK_DOES_NOT_CONNECT_NODES</a></div><div class="ttdoc">The nodes within PDU&amp;#39;s previous and next fields are not connected through this link. PDU cannot travel here (inconsistency). </div></div>
<div class="ttc" id="class_link_html_a110ac6153337a18249b4a4197ed1a2a7"><div class="ttname"><a href="class_link.html#a110ac6153337a18249b4a4197ed1a2a7">Link::getReverseLink</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Link &gt; getReverseLink() const </div><div class="ttdoc">Get ReverseLink reference. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8cpp_source.html#l00431">Link.cpp:431</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a2cafc5931128c3a03ac50fa283e9c18f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double Link::getBandwidth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>
<p>Return reference to nodeA.</p>
<dl class="section return"><dt>Returns</dt><dd>Reference to <a class="el" href="class_node.html" title="Node class. ">Node</a> at nodeA. Return reference to nodeA.</dd>
<dd>
Reference to <a class="el" href="class_node.html" title="Node class. ">Node</a> at nodeA. Return bandwidth of link.</dd>
<dd>
Bandwidth. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00074">74</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;                                {</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">bandwidth</a>;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;}</div>
<div class="ttc" id="class_link_html_aff4506be6c9b62b335e3a389a01969ef"><div class="ttname"><a href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">Link::bandwidth</a></div><div class="ttdeci">double bandwidth</div><div class="ttdoc">Bandwidth of this link, typically in bits per second. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00073">Link.h:73</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a61938273683eed82bfc8fff1b13d077d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt; Link::getDestinationNode </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return pointer to nodeB, the Destination node of a Simplex link. </p>
<dl class="section return"><dt>Returns</dt><dd>Pointer to nodeB. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00358">358</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;                                                   {</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#adb8020ddc851ceb0bf5dba01182d688c">getNodeB</a>();</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;}</div>
<div class="ttc" id="class_link_html_adb8020ddc851ceb0bf5dba01182d688c"><div class="ttname"><a href="class_link.html#adb8020ddc851ceb0bf5dba01182d688c">Link::getNodeB</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Node &gt; getNodeB() const </div><div class="ttdoc">Return pointer to nodeB (another side of link). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8cpp_source.html#l00340">Link.cpp:340</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af5d1051d4f63ff9018fd4d6f5848dcf1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::getDroppedPdusCountMedium </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get count of dropped or discarded PDUs from medium.</p>
<p>A PDU will typically be discarded if the link goes down and there are PDUs in inTransitQueue.</p>
<dl class="section return"><dt>Returns</dt><dd>Count of dropped or discarded PDUs from medium or inTransitQueue. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00382">382</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;                                                   {</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">droppedPdusCountMedium</a>;</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;}</div>
<div class="ttc" id="class_link_html_a71c43c39d94c9b8b95d1810b5c7d17ac"><div class="ttname"><a href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">Link::droppedPdusCountMedium</a></div><div class="ttdeci">unsigned int droppedPdusCountMedium</div><div class="ttdoc">Count of dropped PDUs by this link&amp;#39;s medium. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00080">Link.h:80</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a0866e5df549e6c3d83c0247d098d4ab0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::getDroppedPdusCountTransmissionServer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get count of dropped or discarded PDUs from transmission server.</p>
<p>A PDU will typically be discarded when the PDU arrives for service and the facility is currently down.</p>
<dl class="section return"><dt>Returns</dt><dd>Count of dropped or discarded PDUs from transmission server. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00370">370</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;                                                               {</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#ac1724d4f29211f7008a14c767f9dc359">getDroppedTokensCount</a>();</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;}</div>
<div class="ttc" id="class_facility_html_ac1724d4f29211f7008a14c767f9dc359"><div class="ttname"><a href="class_facility.html#ac1724d4f29211f7008a14c767f9dc359">Facility::getDroppedTokensCount</a></div><div class="ttdeci">unsigned int getDroppedTokensCount() const </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00907">Facility.cpp:907</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00079">Link.h:79</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a194c6afd1182f7543ebd50f859b86123"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::getDroppedPdusCountWholeLink </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get count of dropped or discarded PDUs from transmission server and medium.</p>
<p>The sum of dropped PDUs from transmission server and medium.</p>
<dl class="section return"><dt>Returns</dt><dd>Count of dropped or discarded PDUs from transmission server and medium. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00394">394</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;                                                      {</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#ac1724d4f29211f7008a14c767f9dc359">getDroppedTokensCount</a>() + <a class="code" href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">droppedPdusCountMedium</a>;</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;}</div>
<div class="ttc" id="class_facility_html_ac1724d4f29211f7008a14c767f9dc359"><div class="ttname"><a href="class_facility.html#ac1724d4f29211f7008a14c767f9dc359">Facility::getDroppedTokensCount</a></div><div class="ttdeci">unsigned int getDroppedTokensCount() const </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00907">Facility.cpp:907</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00079">Link.h:79</a></div></div>
<div class="ttc" id="class_link_html_a71c43c39d94c9b8b95d1810b5c7d17ac"><div class="ttname"><a href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">Link::droppedPdusCountMedium</a></div><div class="ttdeci">unsigned int droppedPdusCountMedium</div><div class="ttdoc">Count of dropped PDUs by this link&amp;#39;s medium. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00080">Link.h:80</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="abb8a206db623b733b98bb5866335b19f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::getInTransitQueueSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get current PDU in-transit queue size. </p>
<dl class="section return"><dt>Returns</dt><dd>inTransitQueue size. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00134">134</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;                                               {</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a>.size();</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;}</div>
<div class="ttc" id="class_link_html_a53ed79d4f4d927e120d0cbfa00158089"><div class="ttname"><a href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">Link::inTransitQueue</a></div><div class="ttdeci">std::list&lt; std::shared_ptr&lt; const ProtocolDataUnit &gt; &gt; inTransitQueue</div><div class="ttdoc">Queue for PDUs in transit (in propagation) in this link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00076">Link.h:76</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a698315546b33a6808b37ccadeffa0d65"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96">LinkType</a> Link::getLinkType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get LinkType (type of link) of this link. </p>
<dl class="section return"><dt>Returns</dt><dd>Type of <a class="el" href="class_link.html" title="Link class. ">Link</a> (typically simplex or duplex). </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00419">419</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;                                 {</div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">linkType</a>;</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;}</div>
<div class="ttc" id="class_link_html_aa5605d4788830084dc9ca7d3e1fc418f"><div class="ttname"><a href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">Link::linkType</a></div><div class="ttdeci">LinkType linkType</div><div class="ttdoc">Type of link (typically Simplex or Duplex). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00081">Link.h:81</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3ae26f20287944d54c2db9d12b56f28d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::getMaxRecordedTransmissionQueueSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) max recorded queue size. </p>
<dl class="section return"><dt>Returns</dt><dd>Transmission or underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> max recorded queue size. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00298">298</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;                                                             {</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#a6ed30291bca3882e011216265f7d7462">getMaxRecordedQueueSize</a>();</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;}</div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00079">Link.h:79</a></div></div>
<div class="ttc" id="class_facility_html_a6ed30291bca3882e011216265f7d7462"><div class="ttname"><a href="class_facility.html#a6ed30291bca3882e011216265f7d7462">Facility::getMaxRecordedQueueSize</a></div><div class="ttdeci">unsigned int getMaxRecordedQueueSize() const </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00812">Facility.cpp:812</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad0d2091b3406725300be167b82216552"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string Link::getName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return name of link. </p>
<dl class="section return"><dt>Returns</dt><dd>Name as string. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00092">92</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;                              {</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#a3175152212d21764b83996c540617838">name</a>;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;}</div>
<div class="ttc" id="class_link_html_a3175152212d21764b83996c540617838"><div class="ttname"><a href="class_link.html#a3175152212d21764b83996c540617838">Link::name</a></div><div class="ttdeci">std::string name</div><div class="ttdoc">Name of this link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00075">Link.h:75</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af485c0065bf1fdc5c296b45f6ef96fd3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt; Link::getNodeA </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return pointer to nodeA (one side of link). </p>
<dl class="section return"><dt>Returns</dt><dd>Pointer to nodeA. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00331">331</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;                                         {</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a>;</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;}</div>
<div class="ttc" id="class_link_html_afc5d6ab142420b803c1f9802ad0199f5"><div class="ttname"><a href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">Link::nodeA</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeA</div><div class="ttdoc">Node at one side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00071">Link.h:71</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="adb8020ddc851ceb0bf5dba01182d688c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt; Link::getNodeB </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return pointer to nodeB (another side of link). </p>
<dl class="section return"><dt>Returns</dt><dd>Pointer to nodeB. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00340">340</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;                                         {</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>;</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;}</div>
<div class="ttc" id="class_link_html_af7a426a53a41d26351c85cb2cea50d60"><div class="ttname"><a href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">Link::nodeB</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeB</div><div class="ttdoc">Node at the other side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00072">Link.h:72</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab6f3bcc6896090d2b0ab665c0fedbf17"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double Link::getPropagationDelay </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return propagation delay or latency of link. </p>
<dl class="section return"><dt>Returns</dt><dd>Propagation delay. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00083">83</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                                       {</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">propagationDelay</a>;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;}</div>
<div class="ttc" id="class_link_html_a31855f1eaf9c6562f1dc2067d475dd4d"><div class="ttname"><a href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">Link::propagationDelay</a></div><div class="ttdeci">double propagationDelay</div><div class="ttdoc">Propagation delay of this link, which is medium-dependent, typically in seconds. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a110ac6153337a18249b4a4197ed1a2a7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_link.html">Link</a> &gt; Link::getReverseLink </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get ReverseLink reference. </p>
<p>Get the reference or pointer to the reverse link in case of duplex links.</p>
<dl class="section return"><dt>Returns</dt><dd>Reverse link smart pointer or nullptr if it is a simplex link. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00431">431</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;                                               {</div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">linkType</a> == <a class="code" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96aea1abc1cf13667617460c8e0c59c02c1">LinkType::SIMPLEX_LINK</a>) {</div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>; <span class="comment">// Make sure a nullptr is returned in case of Simplex links, regardless of the contents of member reverseLink.</span></div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_link.html#ad088198953b55a9c6781e15dfa49ad72">reverseLink</a>;</div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;    }</div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;}</div>
<div class="ttc" id="class_link_html_aa5605d4788830084dc9ca7d3e1fc418f"><div class="ttname"><a href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">Link::linkType</a></div><div class="ttdeci">LinkType linkType</div><div class="ttdoc">Type of link (typically Simplex or Duplex). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00081">Link.h:81</a></div></div>
<div class="ttc" id="class_link_html_ad088198953b55a9c6781e15dfa49ad72"><div class="ttname"><a href="class_link.html#ad088198953b55a9c6781e15dfa49ad72">Link::reverseLink</a></div><div class="ttdeci">std::shared_ptr&lt; Link &gt; reverseLink</div><div class="ttdoc">Contains the pointer for the link in the reverse direction in case of Duplex links. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00082">Link.h:82</a></div></div>
<div class="ttc" id="_link_type_8h_html_a1e09bc05c5df6349a74bd3b9db638a96aea1abc1cf13667617460c8e0c59c02c1"><div class="ttname"><a href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96aea1abc1cf13667617460c8e0c59c02c1">LinkType::SIMPLEX_LINK</a></div><div class="ttdoc">One-way link between two nodes. </div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a4f8c266451029f36a935712f296981bd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt; Link::getSourceNode </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return pointer to nodeA, the Source node of a Simplex link. </p>
<dl class="section return"><dt>Returns</dt><dd>Pointer to nodeA. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00349">349</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;                                              {</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#af485c0065bf1fdc5c296b45f6ef96fd3">getNodeA</a>();</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;}</div>
<div class="ttc" id="class_link_html_af485c0065bf1fdc5c296b45f6ef96fd3"><div class="ttname"><a href="class_link.html#af485c0065bf1fdc5c296b45f6ef96fd3">Link::getNodeA</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Node &gt; getNodeA() const </div><div class="ttdoc">Return pointer to nodeA (one side of link). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8cpp_source.html#l00331">Link.cpp:331</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a297af435322be39d8562091688c460a7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::list&lt; <a class="el" href="class_facility_queue_element.html">FacilityQueueElement</a> &gt;::size_type Link::getTransmissionQueueSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) queue size. </p>
<dl class="section return"><dt>Returns</dt><dd>Transmission or underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> queue size. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00289">289</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;                                                                            {</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#a61f5bb8a3af86066d29dd2eeca3cdd84">getQueueSize</a>();</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;}</div>
<div class="ttc" id="class_facility_html_a61f5bb8a3af86066d29dd2eeca3cdd84"><div class="ttname"><a href="class_facility.html#a61f5bb8a3af86066d29dd2eeca3cdd84">Facility::getQueueSize</a></div><div class="ttdeci">std::list&lt; FacilityQueueElement &gt;::size_type getQueueSize() const </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00721">Facility.cpp:721</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00079">Link.h:79</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab93be277b905f1bd1746d649ebb4461d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::getTransmissionQueueSizeLimit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) queue size limit. </p>
<dl class="section return"><dt>Returns</dt><dd>Transmission or underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> queue size limit. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00307">307</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;                                                       {</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#ababbaa909332f3c55699721dc087f0c3">getQueueSizeLimit</a>();</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;}</div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00079">Link.h:79</a></div></div>
<div class="ttc" id="class_facility_html_ababbaa909332f3c55699721dc087f0c3"><div class="ttname"><a href="class_facility.html#ababbaa909332f3c55699721dc087f0c3">Facility::getQueueSizeLimit</a></div><div class="ttdeci">unsigned int getQueueSizeLimit() const </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00950">Facility.cpp:950</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8ed2e4ac2f5381d53399f8937e790b93"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Link::isNodeAlinkedToNodeB </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td>
          <td class="paramname"><em>nodeA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td>
          <td class="paramname"><em>nodeB</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Verifies whether this link connects parameter nodeA and nodeB. </p>
<p>Returns true if nodeA is connected to nodeB through this link. The nodes are parameters. Returns false otherwise. Note that direction matters here. The direction is from nodeA to nodeB. If the links connects from nodeB to nodeA, the function will return false.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nodeA</td><td><a class="el" href="class_node.html" title="Node class. ">Node</a> at end A of link. </td></tr>
    <tr><td class="paramname">nodeB</td><td><a class="el" href="class_node.html" title="Node class. ">Node</a> at end B of link. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if nodeA is connected to nodeB, false otherwise. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00451">451</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;                                                                                          {</div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;    <span class="keywordflow">return</span> (this-&gt;<a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a> == <a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a> &amp;&amp; this-&gt;<a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a> == <a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>);</div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;}<div class="ttc" id="class_link_html_afc5d6ab142420b803c1f9802ad0199f5"><div class="ttname"><a href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">Link::nodeA</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeA</div><div class="ttdoc">Node at one side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00071">Link.h:71</a></div></div>
<div class="ttc" id="class_link_html_af7a426a53a41d26351c85cb2cea50d60"><div class="ttname"><a href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">Link::nodeB</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeB</div><div class="ttdoc">Node at the other side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00072">Link.h:72</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aa9f5b6b14f9f191421c7e131ccb288ea"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Link::isTransmissionServerBusy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the busy status of this <a class="el" href="class_link.html" title="Link class. ">Link</a>'s transmission server (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>).</p>
<p>The busy status is obtained directly from the underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> (transmission server).</p>
<dl class="section return"><dt>Returns</dt><dd>True if busy, false if non-busy (not necessarily available, however; link might be down). </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00248">248</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;                                          {</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#a51a7f1911c56425bd1f341b3c2b005e0">isBusy</a>();</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;}</div>
<div class="ttc" id="class_facility_html_a51a7f1911c56425bd1f341b3c2b005e0"><div class="ttname"><a href="class_facility.html#a51a7f1911c56425bd1f341b3c2b005e0">Facility::isBusy</a></div><div class="ttdeci">bool isBusy() const </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00624">Facility.cpp:624</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00079">Link.h:79</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3f1d8f13ecc78be10812fa1d78670339"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Link::isUp </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return true if link is up; false otherwise. This status is the direct status of underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a>. </p>
<dl class="section return"><dt>Returns</dt><dd>Status of link. True if up; false otherwise. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00101">101</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;                      {</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#a648c145304ac37af293458ea11f674c3">isUp</a>();</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;}</div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00079">Link.h:79</a></div></div>
<div class="ttc" id="class_facility_html_a648c145304ac37af293458ea11f674c3"><div class="ttname"><a href="class_facility.html#a648c145304ac37af293458ea11f674c3">Facility::isUp</a></div><div class="ttdeci">bool isUp() const </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00681">Facility.cpp:681</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a4be56bec31ca5a278cce5c4b604b03ec"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83af">LinkReturnType</a> Link::propagatePdu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a>&#160;</td>
          <td class="paramname"><em>nextEvent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; const <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td>
          <td class="paramname"><em>pdu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Ends transmission (release PDU from <a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) and propagate PDU through this link. </p>
<p>First, PDU is released from transmission server. Then, PDU is put into inTransitQueue and an arrival event (typically PDUTOKEN_ARRIVAL_AT_NODE) is scheduled such that the PDU arrives at the destinaton after the propagation delay. If the link is down, the PDU is discarded and statistics, updated. This incident might never happen, since it is likely that no PDU finishes transmission if or after a link is set down. This function checks whether the "previous" and "next" nodes within the PDU fields are in fact connected through this link, or through the reverse link. It will activate the appropriate forward or reverse link, or return an ERROR message otherwise.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nextEvent</td><td>Next event to schedule after propagation, typically an arrival event. </td></tr>
    <tr><td class="paramname">pdu</td><td>PDU to propagate.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Return type or result of propagation attempt. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00217">217</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;                                                                                                {</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    <span class="comment">// Consistency check. If nodes in PDU&#39;s previous and next fields are not connected by this node, then refuse propagation and return error state.</span></div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    <span class="keywordflow">if</span> (pdu-&gt;previous == <a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a> &amp;&amp; pdu-&gt;next == <a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>) { <span class="comment">// Forward link (this link) connects the nodes. Use it.</span></div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;        <span class="comment">// Release PDU from transmission Facility.</span></div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;        <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#af3c20895dff840f8db94350070360e70">release</a>(pdu);</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;        <span class="comment">// If link is down, discard PDU, update statistics.</span></div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;        <span class="keywordflow">if</span> (!<a class="code" href="class_link.html#a3f1d8f13ecc78be10812fa1d78670339">isUp</a>()) {</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;            ++<a class="code" href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">droppedPdusCountMedium</a>;</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa0bec40bfb1c3fa48c0a7b3b5817508f4">LinkReturnType::LINK_DOWN_PDU_DROPPED</a>;</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;        }</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;        <span class="comment">// Otherwise, insert PDU into inTransitQueue and schedule next arrival event.</span></div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;        <a class="code" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a>.push_back(pdu); <span class="comment">// Insert into queue.</span></div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;        <a class="code" href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">scheduler</a>.<a class="code" href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">schedule</a>(<a class="code" href="class_event.html">Event</a>(<a class="code" href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">propagationDelay</a>, nextEvent, pdu));</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa546235efbb1655a5182b7eaf007ac0cc">LinkReturnType::PDU_IN_TRANSIT_NEXT_EVENT_SCHEDULED</a>;</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">linkType</a> == <a class="code" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975">LinkType::DUPLEX_LINK</a> &amp;&amp; pdu-&gt;next == <a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a> &amp;&amp; pdu-&gt;previous == <a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>) { <span class="comment">// The reverse link must be used for this PDU, in case of duplex links.</span></div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;        <span class="comment">// Call this function here in recursion for the reverse link.</span></div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_link.html#a110ac6153337a18249b4a4197ed1a2a7">getReverseLink</a>()-&gt;propagatePdu(nextEvent, pdu);</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;        <span class="comment">// Neither the forward, nor the reverse link connect the nodes within the PDU. Return error.</span></div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa1540ac8eab2f22bb0c7e66c69ff50dc3">LinkReturnType::ERROR_LINK_DOES_NOT_CONNECT_NODES</a>;</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    }</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;}</div>
<div class="ttc" id="class_event_html"><div class="ttname"><a href="class_event.html">Event</a></div><div class="ttdoc">Event class. </div><div class="ttdef"><b>Definition:</b> <a href="_event_8h_source.html#l00035">Event.h:35</a></div></div>
<div class="ttc" id="class_link_html_aa5605d4788830084dc9ca7d3e1fc418f"><div class="ttname"><a href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">Link::linkType</a></div><div class="ttdeci">LinkType linkType</div><div class="ttdoc">Type of link (typically Simplex or Duplex). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00081">Link.h:81</a></div></div>
<div class="ttc" id="_link_type_8h_html_a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975"><div class="ttname"><a href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975">LinkType::DUPLEX_LINK</a></div><div class="ttdoc">Two-way, bidirectional link betwen to nodes. </div></div>
<div class="ttc" id="class_facility_html_af3c20895dff840f8db94350070360e70"><div class="ttname"><a href="class_facility.html#af3c20895dff840f8db94350070360e70">Facility::release</a></div><div class="ttdeci">FacilityReturnType release(std::shared_ptr&lt; const Token &gt; token)</div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00584">Facility.cpp:584</a></div></div>
<div class="ttc" id="class_link_html_afc5d6ab142420b803c1f9802ad0199f5"><div class="ttname"><a href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">Link::nodeA</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeA</div><div class="ttdoc">Node at one side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00071">Link.h:71</a></div></div>
<div class="ttc" id="class_link_html_a53ed79d4f4d927e120d0cbfa00158089"><div class="ttname"><a href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">Link::inTransitQueue</a></div><div class="ttdeci">std::list&lt; std::shared_ptr&lt; const ProtocolDataUnit &gt; &gt; inTransitQueue</div><div class="ttdoc">Queue for PDUs in transit (in propagation) in this link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00076">Link.h:76</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00079">Link.h:79</a></div></div>
<div class="ttc" id="class_scheduler_html_ae84f19f548d606f50fba69d00fe691b1"><div class="ttname"><a href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">Scheduler::schedule</a></div><div class="ttdeci">void schedule(const Event &amp;event)</div><div class="ttdef"><b>Definition:</b> <a href="_scheduler_8cpp_source.html#l00056">Scheduler.cpp:56</a></div></div>
<div class="ttc" id="class_link_html_a3f1d8f13ecc78be10812fa1d78670339"><div class="ttname"><a href="class_link.html#a3f1d8f13ecc78be10812fa1d78670339">Link::isUp</a></div><div class="ttdeci">virtual bool isUp() const </div><div class="ttdoc">Return true if link is up; false otherwise. This status is the direct status of underlying Facility...</div><div class="ttdef"><b>Definition:</b> <a href="_link_8cpp_source.html#l00101">Link.cpp:101</a></div></div>
<div class="ttc" id="class_link_html_a71c43c39d94c9b8b95d1810b5c7d17ac"><div class="ttname"><a href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">Link::droppedPdusCountMedium</a></div><div class="ttdeci">unsigned int droppedPdusCountMedium</div><div class="ttdoc">Count of dropped PDUs by this link&amp;#39;s medium. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00080">Link.h:80</a></div></div>
<div class="ttc" id="class_link_html_af7a426a53a41d26351c85cb2cea50d60"><div class="ttname"><a href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">Link::nodeB</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeB</div><div class="ttdoc">Node at the other side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00072">Link.h:72</a></div></div>
<div class="ttc" id="class_link_html_a31855f1eaf9c6562f1dc2067d475dd4d"><div class="ttname"><a href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">Link::propagationDelay</a></div><div class="ttdeci">double propagationDelay</div><div class="ttdoc">Propagation delay of this link, which is medium-dependent, typically in seconds. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
<div class="ttc" id="class_link_html_ad60d0e445f4593579b62a3c2ecd1fa75"><div class="ttname"><a href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">Link::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00078">Link.h:78</a></div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa546235efbb1655a5182b7eaf007ac0cc"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa546235efbb1655a5182b7eaf007ac0cc">LinkReturnType::PDU_IN_TRANSIT_NEXT_EVENT_SCHEDULED</a></div><div class="ttdoc">PDU is in transit within link medium (and within inTransitQueue). </div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa1540ac8eab2f22bb0c7e66c69ff50dc3"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa1540ac8eab2f22bb0c7e66c69ff50dc3">LinkReturnType::ERROR_LINK_DOES_NOT_CONNECT_NODES</a></div><div class="ttdoc">The nodes within PDU&amp;#39;s previous and next fields are not connected through this link. PDU cannot travel here (inconsistency). </div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa0bec40bfb1c3fa48c0a7b3b5817508f4"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa0bec40bfb1c3fa48c0a7b3b5817508f4">LinkReturnType::LINK_DOWN_PDU_DROPPED</a></div><div class="ttdoc">Link is down. PDU was dropped (or enqueued, depending on the implementation of function Facility::req...</div></div>
<div class="ttc" id="class_link_html_a110ac6153337a18249b4a4197ed1a2a7"><div class="ttname"><a href="class_link.html#a110ac6153337a18249b4a4197ed1a2a7">Link::getReverseLink</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Link &gt; getReverseLink() const </div><div class="ttdoc">Get ReverseLink reference. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8cpp_source.html#l00431">Link.cpp:431</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a13cc3d87988b98b33760ba3705f6bd0c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::purgeInTransitQueue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Purge inTransitQueue, update statistics, return number of dropped PDUs from link medium. </p>
<dl class="section return"><dt>Returns</dt><dd>Number of PDUs dropped from inTransitQueue. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00403">403</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;                                       {</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;    <span class="comment">// Drop each PDU in inTransitQueue and update statistics.</span></div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> droppedPdusHere = <a class="code" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a>.size(); <span class="comment">// PDUs dropped from link medium, in transit queue.</span></div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;    <span class="keywordflow">while</span> (<a class="code" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a>.size() &gt; 0) {</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;        <a class="code" href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">scheduler</a>.<a class="code" href="class_scheduler.html#ac09d9f9b4147c949268fa6bc66ced974">removeEvents</a>(<a class="code" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a>.front()); <span class="comment">// Delete events related to first PDU.</span></div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;        <a class="code" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a>.pop_front(); <span class="comment">// Remove first PDU.</span></div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;    }</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;    <a class="code" href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">droppedPdusCountMedium</a> += droppedPdusHere; <span class="comment">// Update member counter for dropped PDUs in link medium.</span></div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;    <span class="keywordflow">return</span> droppedPdusHere;</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;}</div>
<div class="ttc" id="class_scheduler_html_ac09d9f9b4147c949268fa6bc66ced974"><div class="ttname"><a href="class_scheduler.html#ac09d9f9b4147c949268fa6bc66ced974">Scheduler::removeEvents</a></div><div class="ttdeci">unsigned int removeEvents(std::shared_ptr&lt; const Entity &gt; entity)</div><div class="ttdoc">Removes events from Event Chain that contains a matching entity in the Event object. </div><div class="ttdef"><b>Definition:</b> <a href="_scheduler_8cpp_source.html#l00117">Scheduler.cpp:117</a></div></div>
<div class="ttc" id="class_link_html_a53ed79d4f4d927e120d0cbfa00158089"><div class="ttname"><a href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">Link::inTransitQueue</a></div><div class="ttdeci">std::list&lt; std::shared_ptr&lt; const ProtocolDataUnit &gt; &gt; inTransitQueue</div><div class="ttdoc">Queue for PDUs in transit (in propagation) in this link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00076">Link.h:76</a></div></div>
<div class="ttc" id="class_link_html_a71c43c39d94c9b8b95d1810b5c7d17ac"><div class="ttname"><a href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">Link::droppedPdusCountMedium</a></div><div class="ttdeci">unsigned int droppedPdusCountMedium</div><div class="ttdoc">Count of dropped PDUs by this link&amp;#39;s medium. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00080">Link.h:80</a></div></div>
<div class="ttc" id="class_link_html_ad60d0e445f4593579b62a3c2ecd1fa75"><div class="ttname"><a href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">Link::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00078">Link.h:78</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="afe69b641a7b52cdc830307dfcd9e8af3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::setDown </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set <a class="el" href="class_link.html" title="Link class. ">Link</a> down (in both directions in case of duplex links). </p>
<p>Sets the underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> down. <a class="el" href="class_link.html" title="Link class. ">Link</a>'s transmission server statistics and status are controlled by this facility. Drops both PDUs in transmission and PDUs in transit through link medium. </p>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00125">125</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;                           {</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#a0f7671f75b0309c520692c2a210e734e">setDown</a>() + <a class="code" href="class_link.html#a13cc3d87988b98b33760ba3705f6bd0c">purgeInTransitQueue</a>() + ((<a class="code" href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">linkType</a> == <a class="code" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975">LinkType::DUPLEX_LINK</a>) ? <a class="code" href="class_link.html#a110ac6153337a18249b4a4197ed1a2a7">getReverseLink</a>()-&gt;setDown() : 0);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;}</div>
<div class="ttc" id="class_link_html_aa5605d4788830084dc9ca7d3e1fc418f"><div class="ttname"><a href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">Link::linkType</a></div><div class="ttdeci">LinkType linkType</div><div class="ttdoc">Type of link (typically Simplex or Duplex). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00081">Link.h:81</a></div></div>
<div class="ttc" id="_link_type_8h_html_a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975"><div class="ttname"><a href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975">LinkType::DUPLEX_LINK</a></div><div class="ttdoc">Two-way, bidirectional link betwen to nodes. </div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00079">Link.h:79</a></div></div>
<div class="ttc" id="class_facility_html_a0f7671f75b0309c520692c2a210e734e"><div class="ttname"><a href="class_facility.html#a0f7671f75b0309c520692c2a210e734e">Facility::setDown</a></div><div class="ttdeci">unsigned int setDown()</div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00709">Facility.cpp:709</a></div></div>
<div class="ttc" id="class_link_html_a13cc3d87988b98b33760ba3705f6bd0c"><div class="ttname"><a href="class_link.html#a13cc3d87988b98b33760ba3705f6bd0c">Link::purgeInTransitQueue</a></div><div class="ttdeci">unsigned int purgeInTransitQueue()</div><div class="ttdoc">Purge inTransitQueue, update statistics, return number of dropped PDUs from link medium. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8cpp_source.html#l00403">Link.cpp:403</a></div></div>
<div class="ttc" id="class_link_html_a110ac6153337a18249b4a4197ed1a2a7"><div class="ttname"><a href="class_link.html#a110ac6153337a18249b4a4197ed1a2a7">Link::getReverseLink</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Link &gt; getReverseLink() const </div><div class="ttdoc">Get ReverseLink reference. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8cpp_source.html#l00431">Link.cpp:431</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af64db4e49ef26c305b301db2ae318244"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Link::setTransmissionQueueSizeLimit </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>limit</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) queue size limit (for both forward and reverse links in case of duplex links). </p>
<p>If not set, the default here is the default inherited from <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> class (&lt;double&gt;max()).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">limit</td><td>Transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) queue size limit. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00319">319</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;                                                           {</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#a4d8bbec743dae89da983619eedb2e129">setQueueSizeLimit</a>(limit);</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">linkType</a> == <a class="code" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975">LinkType::DUPLEX_LINK</a>) {</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;        <a class="code" href="class_link.html#a110ac6153337a18249b4a4197ed1a2a7">getReverseLink</a>()-&gt;setTransmissionQueueSizeLimit(limit);</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;    }</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;}</div>
<div class="ttc" id="class_link_html_aa5605d4788830084dc9ca7d3e1fc418f"><div class="ttname"><a href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">Link::linkType</a></div><div class="ttdeci">LinkType linkType</div><div class="ttdoc">Type of link (typically Simplex or Duplex). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00081">Link.h:81</a></div></div>
<div class="ttc" id="_link_type_8h_html_a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975"><div class="ttname"><a href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975">LinkType::DUPLEX_LINK</a></div><div class="ttdoc">Two-way, bidirectional link betwen to nodes. </div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00079">Link.h:79</a></div></div>
<div class="ttc" id="class_facility_html_a4d8bbec743dae89da983619eedb2e129"><div class="ttname"><a href="class_facility.html#a4d8bbec743dae89da983619eedb2e129">Facility::setQueueSizeLimit</a></div><div class="ttdeci">void setQueueSizeLimit(unsigned int limit)</div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00936">Facility.cpp:936</a></div></div>
<div class="ttc" id="class_link_html_a110ac6153337a18249b4a4197ed1a2a7"><div class="ttname"><a href="class_link.html#a110ac6153337a18249b4a4197ed1a2a7">Link::getReverseLink</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Link &gt; getReverseLink() const </div><div class="ttdoc">Get ReverseLink reference. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8cpp_source.html#l00431">Link.cpp:431</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a57170d6e8669a32107794b0a2cc98890"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Link::setUp </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set <a class="el" href="class_link.html" title="Link class. ">Link</a> up (in both directions in case of duplex links). </p>
<p>Sets the underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> up. <a class="el" href="class_link.html" title="Link class. ">Link</a>'s transmission server statistics and status are controlled by this facility. </p>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00111">111</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;                 {</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#a9cf2c05d0966a731a8a9d9157a13df5e">setUp</a>();</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">linkType</a> == <a class="code" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975">LinkType::DUPLEX_LINK</a>) {</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        <a class="code" href="class_link.html#a110ac6153337a18249b4a4197ed1a2a7">getReverseLink</a>()-&gt;setUp();</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    }</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;}</div>
<div class="ttc" id="class_link_html_aa5605d4788830084dc9ca7d3e1fc418f"><div class="ttname"><a href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">Link::linkType</a></div><div class="ttdeci">LinkType linkType</div><div class="ttdoc">Type of link (typically Simplex or Duplex). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00081">Link.h:81</a></div></div>
<div class="ttc" id="_link_type_8h_html_a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975"><div class="ttname"><a href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975">LinkType::DUPLEX_LINK</a></div><div class="ttdoc">Two-way, bidirectional link betwen to nodes. </div></div>
<div class="ttc" id="class_facility_html_a9cf2c05d0966a731a8a9d9157a13df5e"><div class="ttname"><a href="class_facility.html#a9cf2c05d0966a731a8a9d9157a13df5e">Facility::setUp</a></div><div class="ttdeci">void setUp()</div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00697">Facility.cpp:697</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00079">Link.h:79</a></div></div>
<div class="ttc" id="class_link_html_a110ac6153337a18249b4a4197ed1a2a7"><div class="ttname"><a href="class_link.html#a110ac6153337a18249b4a4197ed1a2a7">Link::getReverseLink</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Link &gt; getReverseLink() const </div><div class="ttdoc">Get ReverseLink reference. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8cpp_source.html#l00431">Link.cpp:431</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a9600cdb73665ae77d5237abdb2ed51c3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83af">LinkReturnType</a> Link::transmitPdu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a>&#160;</td>
          <td class="paramname"><em>transmitEventType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a>&#160;</td>
          <td class="paramname"><em>endTransmitEventType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; const <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td>
          <td class="paramname"><em>pdu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Requests transmission a PDU to (or through) the link. </p>
<p>The transmission is the first step in fully moving one PDU from the source node to a destination node connected by a link. The transmission puts the PDU into the link medium. After transmission, the PDU must then propagate through the link medium until reaching the destination node.</p>
<p>This function checks whether the "previous" and "next" nodes within the PDU fields are in fact connected through this link, or through the reverse link. It will activate the appropriate forward or reverse link, or return an ERROR message otherwise.</p>
<p>The link is modelled with a <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> with one server, acting as the transmission server. The service time is a function of the link bandwidth and PDU size, such that:</p>
<p>service_time = PDU_size / bandwidth</p>
<p>Connected to the output of the transmission server, there is a delay center or infinite capacity server. This delay center models the propagation delay of the link. The complete handling of a PDU through a link will be composed of three events:</p>
<ol type="1">
<li>REQUEST_PDU_TRANSMISSION_AT_LINK: if successful, the next END_TRANSMISSION_PROPAGATE_PDU_AT_LINK event must be scheduled for the link. Otherwise, the PDU was probably enqueued or dropped.</li>
<li>END_TRANSMISSION_PROPAGATE_PDU_AT_LINK: if the previous event was successful, this event is scheduled. This event will cause the <a class="el" href="class_link.html" title="Link class. ">Link</a> transmission server to release the PDU and then the PDU will commence propagation in the link. This is done by scheduling a PDUTOKEN_ARRIVAL_AT_NODE after the fixed-time propagation delay.</li>
<li>PDUTOKEN_ARRIVAL_AT_NODE: scheduled after transmission and release of PDU from <a class="el" href="class_link.html" title="Link class. ">Link</a>'s transmission server. At this event, the PDU has arrived at the destination node.</li>
<li>ERROR_LINK_DOES_NOT_CONNECT_NODES: PDU's fields "previous" and "next" nodes are not connected through this link or through the reverse link. The PDU will not be transmitted, unless verifyNodeConsistency is false, in which case the PDU will be transmitted by the forward link without consistency check.</li>
</ol>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">transmitEventType</td><td>Type of event to schedule for transmission. If PDU is enqueued, this event will be used by <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> class. </td></tr>
    <tr><td class="paramname">endTransmitEventType</td><td>Type of event to schedule for after transmission, typically a release/propagation event. </td></tr>
    <tr><td class="paramname">pdu</td><td>Protocol Data Unit to transmit.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Return type or result of transmission request. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00170">170</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;                                                                                                                                       {</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="comment">// Consistency check. If nodes in PDU&#39;s previous and next fields are not connected by this node, then refuse transmission and return error state.</span></div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <span class="keywordflow">if</span> (pdu-&gt;previous == <a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a> &amp;&amp; pdu-&gt;next == <a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>) { <span class="comment">// Forward link (this link) connects the nodes. Use it.</span></div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;        <span class="keywordtype">double</span> transmissionTime = pdu-&gt;getPduSize() * 8.0 / <a class="code" href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">bandwidth</a>; <span class="comment">// Converts PDU size to bits and calculates transmission time based on bandwidth.</span></div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        <span class="comment">// Request service for PDU at Facility (transmission server).</span></div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        <a class="code" href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72c">FacilityReturnType</a> serviceRequestResult = <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#ad8579e469df0909ad36ee6b0719a2173">request</a>(pdu, transmitEventType);</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="comment">// Test outcomes.</span></div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        <span class="keywordflow">if</span> (serviceRequestResult == <a class="code" href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72ca748fbb782cdc23671570937bca42c031">FacilityReturnType::TOKEN_PUT_IN_SERVICE</a>) {</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;            <a class="code" href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">scheduler</a>.<a class="code" href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">schedule</a>(<a class="code" href="class_event.html">Event</a>(transmissionTime, endTransmitEventType, pdu)); <span class="comment">// Successful; schedule next event to release/propagate.</span></div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afacd81b4be909430d796a08b373c59d714">LinkReturnType::PDU_IN_TRANSMISSION_NEXT_EVENT_SCHEDULED</a>;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (serviceRequestResult == <a class="code" href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72ca29752595827eef50aabead37d4eb7761">FacilityReturnType::FACILITY_BUSY_QUEUE_FULL_TOKEN_DROPPED</a>) { <span class="comment">// Facility queue full, PDU was dropped; update statistics.</span></div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;            <span class="comment">// The statistics here are controlled by the Facility class.</span></div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa9b52d9f68401bbcbaba5dc65b99898d1">LinkReturnType::LINK_BUSY_QUEUE_FULL_PDU_DROPPED</a>;</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (serviceRequestResult == <a class="code" href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72caeccec682378d2895857cde4b04dd58e1">FacilityReturnType::FACILITY_DOWN_TOKEN_DROPPED</a>) { <span class="comment">// Facility down (thus link is also down); PDU dropped, update stats of Node?</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;            <span class="comment">// Statistics here are controlled by the Facility class.</span></div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa0bec40bfb1c3fa48c0a7b3b5817508f4">LinkReturnType::LINK_DOWN_PDU_DROPPED</a>;</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (serviceRequestResult == <a class="code" href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72ca9eabb9b43310855334df811fd9c79748">FacilityReturnType::FACILITY_BUSY_TOKEN_ENQUEUED</a>) { <span class="comment">// Facility busy, token enqueued. Nothing else to do.</span></div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa22ccb03889f70235c3d563f564d204c6">LinkReturnType::LINK_BUSY_PDU_ENQUEUED</a>;</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa3e860a081575fc82cc7b6ed2ca602947">LinkReturnType::NOT_IMPLEMENTED</a>; <span class="comment">// Something weird happened...</span></div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        }</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">linkType</a> == <a class="code" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975">LinkType::DUPLEX_LINK</a> &amp;&amp; pdu-&gt;next == <a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a> &amp;&amp; pdu-&gt;previous == <a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>) { <span class="comment">// The reverse link must be used for this PDU, in case of duplex links.</span></div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        <span class="comment">// Call this function here in recursion in case of the reverse link in a duplex link.</span></div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_link.html#a110ac6153337a18249b4a4197ed1a2a7">getReverseLink</a>()-&gt;transmitPdu(transmitEventType, endTransmitEventType, pdu);</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        <span class="comment">// Neither the forward, nor the reverse link connect the nodes within the PDU. Return error.</span></div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa1540ac8eab2f22bb0c7e66c69ff50dc3">LinkReturnType::ERROR_LINK_DOES_NOT_CONNECT_NODES</a>;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    }   </div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;}</div>
<div class="ttc" id="_facility_return_type_8h_html_a4ebe26bb7c3ad3b1926de74522fcc72caeccec682378d2895857cde4b04dd58e1"><div class="ttname"><a href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72caeccec682378d2895857cde4b04dd58e1">FacilityReturnType::FACILITY_DOWN_TOKEN_DROPPED</a></div><div class="ttdoc">Facility is down. Token was dropped (or enqueued, depending on the implementation of function Facilit...</div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa9b52d9f68401bbcbaba5dc65b99898d1"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa9b52d9f68401bbcbaba5dc65b99898d1">LinkReturnType::LINK_BUSY_QUEUE_FULL_PDU_DROPPED</a></div><div class="ttdoc">The queue is full (has reached the imposed limit); PDU for which service was requested was dropped...</div></div>
<div class="ttc" id="class_event_html"><div class="ttname"><a href="class_event.html">Event</a></div><div class="ttdoc">Event class. </div><div class="ttdef"><b>Definition:</b> <a href="_event_8h_source.html#l00035">Event.h:35</a></div></div>
<div class="ttc" id="class_link_html_aa5605d4788830084dc9ca7d3e1fc418f"><div class="ttname"><a href="class_link.html#aa5605d4788830084dc9ca7d3e1fc418f">Link::linkType</a></div><div class="ttdeci">LinkType linkType</div><div class="ttdoc">Type of link (typically Simplex or Duplex). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00081">Link.h:81</a></div></div>
<div class="ttc" id="_link_type_8h_html_a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975"><div class="ttname"><a href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96a1077fecfb51c2f9fb873a911849f9975">LinkType::DUPLEX_LINK</a></div><div class="ttdoc">Two-way, bidirectional link betwen to nodes. </div></div>
<div class="ttc" id="class_link_html_afc5d6ab142420b803c1f9802ad0199f5"><div class="ttname"><a href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">Link::nodeA</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeA</div><div class="ttdoc">Node at one side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00071">Link.h:71</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00079">Link.h:79</a></div></div>
<div class="ttc" id="class_scheduler_html_ae84f19f548d606f50fba69d00fe691b1"><div class="ttname"><a href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">Scheduler::schedule</a></div><div class="ttdeci">void schedule(const Event &amp;event)</div><div class="ttdef"><b>Definition:</b> <a href="_scheduler_8cpp_source.html#l00056">Scheduler.cpp:56</a></div></div>
<div class="ttc" id="_facility_return_type_8h_html_a4ebe26bb7c3ad3b1926de74522fcc72ca29752595827eef50aabead37d4eb7761"><div class="ttname"><a href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72ca29752595827eef50aabead37d4eb7761">FacilityReturnType::FACILITY_BUSY_QUEUE_FULL_TOKEN_DROPPED</a></div><div class="ttdoc">The queue is full (has reached the imposed limit); token for which service was requested was dropped...</div></div>
<div class="ttc" id="class_facility_html_ad8579e469df0909ad36ee6b0719a2173"><div class="ttname"><a href="class_facility.html#ad8579e469df0909ad36ee6b0719a2173">Facility::request</a></div><div class="ttdeci">FacilityReturnType request(std::shared_ptr&lt; const Token &gt; token, EventType eventType)</div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00229">Facility.cpp:229</a></div></div>
<div class="ttc" id="_facility_return_type_8h_html_a4ebe26bb7c3ad3b1926de74522fcc72ca748fbb782cdc23671570937bca42c031"><div class="ttname"><a href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72ca748fbb782cdc23671570937bca42c031">FacilityReturnType::TOKEN_PUT_IN_SERVICE</a></div><div class="ttdoc">Token was successfuly put in service by facility. </div></div>
<div class="ttc" id="class_link_html_af7a426a53a41d26351c85cb2cea50d60"><div class="ttname"><a href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">Link::nodeB</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeB</div><div class="ttdoc">Node at the other side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00072">Link.h:72</a></div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa3e860a081575fc82cc7b6ed2ca602947"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa3e860a081575fc82cc7b6ed2ca602947">LinkReturnType::NOT_IMPLEMENTED</a></div><div class="ttdoc">This function has not been implemented yet. </div></div>
<div class="ttc" id="class_link_html_ad60d0e445f4593579b62a3c2ecd1fa75"><div class="ttname"><a href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">Link::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00078">Link.h:78</a></div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa22ccb03889f70235c3d563f564d204c6"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa22ccb03889f70235c3d563f564d204c6">LinkReturnType::LINK_BUSY_PDU_ENQUEUED</a></div><div class="ttdoc">Link (transmission server) was busy; PDU was enqueued. </div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa1540ac8eab2f22bb0c7e66c69ff50dc3"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa1540ac8eab2f22bb0c7e66c69ff50dc3">LinkReturnType::ERROR_LINK_DOES_NOT_CONNECT_NODES</a></div><div class="ttdoc">The nodes within PDU&amp;#39;s previous and next fields are not connected through this link. PDU cannot travel here (inconsistency). </div></div>
<div class="ttc" id="class_link_html_aff4506be6c9b62b335e3a389a01969ef"><div class="ttname"><a href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">Link::bandwidth</a></div><div class="ttdeci">double bandwidth</div><div class="ttdoc">Bandwidth of this link, typically in bits per second. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00073">Link.h:73</a></div></div>
<div class="ttc" id="_facility_return_type_8h_html_a4ebe26bb7c3ad3b1926de74522fcc72ca9eabb9b43310855334df811fd9c79748"><div class="ttname"><a href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72ca9eabb9b43310855334df811fd9c79748">FacilityReturnType::FACILITY_BUSY_TOKEN_ENQUEUED</a></div><div class="ttdoc">Facility was busy; token was enqueued. </div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afacd81b4be909430d796a08b373c59d714"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afacd81b4be909430d796a08b373c59d714">LinkReturnType::PDU_IN_TRANSMISSION_NEXT_EVENT_SCHEDULED</a></div><div class="ttdoc">PDU was successfully put into transmission (serviced) at Link. </div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa0bec40bfb1c3fa48c0a7b3b5817508f4"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa0bec40bfb1c3fa48c0a7b3b5817508f4">LinkReturnType::LINK_DOWN_PDU_DROPPED</a></div><div class="ttdoc">Link is down. PDU was dropped (or enqueued, depending on the implementation of function Facility::req...</div></div>
<div class="ttc" id="_facility_return_type_8h_html_a4ebe26bb7c3ad3b1926de74522fcc72c"><div class="ttname"><a href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72c">FacilityReturnType</a></div><div class="ttdeci">FacilityReturnType</div><div class="ttdoc">Facility Return Type enum class. </div><div class="ttdef"><b>Definition:</b> <a href="_facility_return_type_8h_source.html#l00028">FacilityReturnType.h:28</a></div></div>
<div class="ttc" id="class_link_html_a110ac6153337a18249b4a4197ed1a2a7"><div class="ttname"><a href="class_link.html#a110ac6153337a18249b4a4197ed1a2a7">Link::getReverseLink</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Link &gt; getReverseLink() const </div><div class="ttdoc">Get ReverseLink reference. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8cpp_source.html#l00431">Link.cpp:431</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="aff4506be6c9b62b335e3a389a01969ef"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double Link::bandwidth</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Bandwidth of this link, typically in bits per second. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00073">73</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="a71c43c39d94c9b8b95d1810b5c7d17ac"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::droppedPdusCountMedium</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Count of dropped PDUs by this link's medium. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00080">80</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="a53ed79d4f4d927e120d0cbfa00158089"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::list&lt;std::shared_ptr&lt;const <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a>&gt; &gt; Link::inTransitQueue</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Queue for PDUs in transit (in propagation) in this link. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00076">76</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa5605d4788830084dc9ca7d3e1fc418f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_link_type_8h.html#a1e09bc05c5df6349a74bd3b9db638a96">LinkType</a> Link::linkType</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Type of link (typically Simplex or Duplex). </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00081">81</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="a3175152212d21764b83996c540617838"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string Link::name</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Name of this link. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00075">75</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="afc5d6ab142420b803c1f9802ad0199f5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;<a class="el" href="class_node.html">Node</a>&gt; Link::nodeA</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="class_node.html" title="Node class. ">Node</a> at one side of the link. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00071">71</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="af7a426a53a41d26351c85cb2cea50d60"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;<a class="el" href="class_node.html">Node</a>&gt; Link::nodeB</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="class_node.html" title="Node class. ">Node</a> at the other side of the link. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00072">72</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="a31855f1eaf9c6562f1dc2067d475dd4d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double Link::propagationDelay</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Propagation delay of this link, which is medium-dependent, typically in seconds. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00074">74</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="ad088198953b55a9c6781e15dfa49ad72"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;<a class="el" href="class_link.html">Link</a>&gt; Link::reverseLink</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Contains the pointer for the link in the reverse direction in case of Duplex links. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00082">82</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="ad60d0e445f4593579b62a3c2ecd1fa75"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_scheduler.html">Scheduler</a>&amp; Link::scheduler</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reference to <a class="el" href="class_scheduler.html" title="Scheduler class. ">Scheduler</a> object. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00078">78</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0f55fbe50f26e0c9d0469e3300584870"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a>&amp; Link::simulatorGlobals</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reference to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00077">77</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="abe44953f8653b44f2b914daa0bb6bcdc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_facility.html">Facility</a> Link::transmissionServer</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Transmission server for this <a class="el" href="class_link.html" title="Link class. ">Link</a> (one-way). </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00079">79</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>QcnSim/<a class="el" href="_link_8h_source.html">Link.h</a></li>
<li>QcnSim/<a class="el" href="_link_8cpp_source.html">Link.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 15 2014 10:33:16 for QCNSim by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
